<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<link href="${ctx}/css/bottombar.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="${ctx}/js/bottombar.js"></script>

<%    
	int index = Integer.parseInt(request.getParameter("index"));

	String class_1 = "td_" + ((index == 1) ? "1" : "0");
	String class_2 = "td_" + ((index == 2) ? "1" : "0");
	String class_3 = "td_" + ((index == 3) ? "1" : "0");
	String class_4 = "td_" + ((index == 4) ? "1" : "0");
	
	String img_1 = "../../../images/bottom_1_" + ((index == 1) ? "1" : "0") + ".png";
	String img_2 = "../../../images/bottom_2_" + ((index == 2) ? "1" : "0") + ".png";
	String img_3 = "../../../images/bottom_3_" + ((index == 3) ? "1" : "0") + ".png";
	String img_4 = "../../../images/bottom_4_" + ((index == 4) ? "1" : "0") + ".png";
%>

<div class="bottombar">
	<table>
		<tr>
			<td class="<%=class_1 %>" onclick="GotoUrl('/mobile/mainMenu');">
				<div>
					<img src="<%=img_1 %>"><br>
					<a style="color: #fff">首页</a>
				</div>
			</td>
			<td class="<%=class_2 %>" onclick="GotoCategory('all');">
				<div>
					<img src="<%=img_2 %>"><br>
					<a style="color: #fff">分类</a>
				</div>
			</td>
			<td class="<%=class_3 %>" onclick="GotoUrl('cart.jsp');">
				<div>
					<img src="<%=img_3 %>"><br>
					<a style="color: #fff">购物车</a>					
				</div>
				<div id="circle_cart_count">0</div>
			</td>
			<%-- <td class="<%=class_4 %>" onclick="GotoUrl('my.jsp');">
				<div>
					<img src="<%=img_4 %>"><br>
					<a>我的</a>
				</div>
			</td> --%>
		</tr>
	</table>
</div>